﻿using System.Collections.Generic;
using AdventureWorks.Domain;
using AdventureWorks.DataAccess.SearchCriterias;
using AdventureWorks.DataAccess.Specifications;
using AdventureWorks.DataAccess.Repositories;
using AdventureWorks.DataAccess.Utils;
using AutoMapper;
using System.Linq;
using NHibernate;
using System;

namespace AdventureWorks.DataAccess.Task
{
    public class SpecialOfferTask : TaskBase<SpecialOffer>
    {
        public PagedResult<SpecialOffer> GetSpecialOffers(SpecialOfferSpecification specification)
        {
            var result = Repository.Find(specification);
            return new PagedResult<SpecialOffer>
            {
                PageResult = result.ToList(),
                Page = 1,
                PageSize = 10
            };
        }


    }
}
